﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Automobile.service.BLL;
using Automobile.service.Model;
using Automobile.service.Common;
namespace Automobile.service.UI.Hander
{
    /// <summary>
    /// SunYi 的摘要说明
    /// </summary>
    public class SunYi : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            DocumentBLL bll = new DocumentBLL();
            context.Response.ContentType = "text/plain";
            Automobile.service.Model.Document dd = new Automobile.service.Model.Document();
            
            dd.Document_Type_Id=Convert.ToInt32(context.Request["Document_Type_Id"]);
            dd.Employee_Id=1;
            dd.Document_Remark=context.Request["Document_Remark"];
            string xml = context.Server.UrlDecode(context.Request.Form["xml"].ToString());
            context.Response.Write(bll.AddDocument(dd,xml));
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}